{% set item = file %}

{% if item != None and item.type != "group" %}
<div class="col-md-12" style="border-bottom:1px solid #ccc"> 
    <span id="fileId" style="display:none;">{{file.id}}</span>    
    <div class="col-md-12">
        {% if _has_login and  (_is_admin or _user_name == item.creator) %}
            <a class="link" href="/note/edit?id={{file.id}}">编辑</a>
            <a class="link" href="javascript:rename({{item.id}}, '{{item.name}}')">重命名</a>
            {% if file.is_public %}
                <a class="link" href="/note/share/cancel?id={{file.id}}">取消分享</a>
            {% else %}
                <a class="link" href="/note/share?id={{file.id}}">分享</a>
            {% end %}
            <a class="move-btn link" data-url="/note/group/select?id={{item.id}}">移动</a>
            <a class="link" href="/note/print?id={{file.id}}" target="_blank">打印</a>
            <a class="red" href="javascript:remove({{item.id}}, '{{item.name}}', {{item.parent_id}})">删除</a>
        {% end %}
    </div>

    <div>{{file.creator}} 创建于 {{file.ctime}} 更新于 {{file.mtime}} </div>
    <span>字数: {{len(item.content)}}</span>
    <span>行数: {{item.content.count("\n")}}</span>

    {% include note/view_tag.html %}
    <span id="result" style="color:green"></span>
</div>
{% end %}